Skip to content

Conversation

@dgryski
Copy link
Member

@dgryski dgryski commented Jan 16, 2026

Fixes #5180

@dgryski dgryski requested review from aykevl and niaow January 16, 2026 21:30
@dgryski dgryski force-pushed the dgryski/named-type-scope branch from cec236b to 4fd15a3 Compare January 16, 2026 21:40
@niaow
Copy link
Member

niaow commented Jan 16, 2026

Maybe add this to the compiler frontend tests (compiler/testdata/interface.*)

@dgryski dgryski force-pushed the dgryski/named-type-scope branch from 4fd15a3 to 91c1d8a Compare January 16, 2026 22:46
@dgryski
Copy link
Member Author

dgryski commented Jan 16, 2026

I don't think I can put it in the golden compiler/testdata/*.ll files since the pointer address will change between runs. It does have a test in the main testdata/ directory though.

@niaow
Copy link
Member

niaow commented Jan 16, 2026

Oh, we should not be using the pointer address for this.

@dgryski
Copy link
Member Author

dgryski commented Jan 16, 2026

There doesn't appear to be anything else aside from pointer addresses to allow us to differentiate scopes. Even the String() representation of a scope includes the pointer address. I'd love a more stable suggestion. I asked in #tools on Slack for advice.

@dgryski
Copy link
Member Author

dgryski commented Jan 16, 2026

Note also this the pointer address of the scope in the compiler, not the pointer at runtime on the device.

@niaow
Copy link
Member

niaow commented Jan 16, 2026

If that is the case then we could loop through the SSA and assign numbers to them? Non-deterministic compilation is not acceptable.

@dgryski
Copy link
Member Author

dgryski commented Jan 16, 2026

Ok. I'll see what I can come up with.

@dgryski
Copy link
Member Author

dgryski commented Jan 17, 2026

PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants